import { request } from '@/utils/hsj/service/index'

// 查询资讯类型列表
export function listInformationCategory(query) {
  return request({
    url: '/system/infoCategory/list',
    method: 'get',
    params: query,
  })
}

// 查询资讯类型列表（排除节点）
export function listInformationCategoryExcludeChild(categoryId) {
  return request({
    url: '/system/infoCategory/list/exclude/' + categoryId,
    method: 'get',
  })
}

// 查询资讯类型详细
export function getInformationCategory(categoryId) {
  return request({
    url: '/system/infoCategory/' + categoryId,
    method: 'get',
  })
}

// 新增资讯类型
export function addInformationCategory(data) {
  return request({
    url: '/system/infoCategory',
    method: 'post',
    data: data,
  })
}

// 修改资讯类型
export function updateInformationCategory(data) {
  return request({
    url: '/system/infoCategory',
    method: 'put',
    data: data,
  })
}

// 删除资讯类型
export function delInformationCategory(categoryId) {
  return request({
    url: '/system/infoCategory/' + categoryId,
    method: 'delete',
  })
}

// 查询资讯类型下拉树结构
export function informationCategoryTreeSelect() {
  return request({
    url: '/system/infoCategory/infoCategoryTree',
    method: 'get',
  })
}
